﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="add.aspx.cs" Inherits="参保_add" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>新参保</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table border="1" cellpadding="4" cellspacing="0" rules="rows">
        <caption>焦作市社会保险新参人员登记表</caption>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td>姓名</td>
            <td>
                <asp:TextBox ID="username" runat="server" MaxLength="50"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="username"
                    Display="Dynamic" ErrorMessage="姓名不能为空"></asp:RequiredFieldValidator></td>
            <td>
                个人编号</td>
            <td>
                <asp:TextBox ID="insuranceId" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="height: 21px">
                性别</td>
            <td style="height: 21px">
                <asp:RadioButtonList ID="sex" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Selected="True">男</asp:ListItem>
                    <asp:ListItem>女</asp:ListItem>
                </asp:RadioButtonList></td>
            <td style="height: 21px">
                出生日期</td>
            <td style="height: 21px">
                <asp:TextBox ID="csrq" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="height: 21px">
                民族</td>
            <td style="height: 21px">
                <asp:DropDownList ID="mz" runat="server" DataSourceID="SqlDataSource1" DataTextField="name"
                    DataValueField="name">
                </asp:DropDownList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:insurance_dbConnectionString %>"
                    SelectCommand="SELECT * FROM [民族表]"></asp:SqlDataSource>
            </td>
            <td style="height: 21px">
                身份证号</td>
            <td style="height: 21px">
                <asp:TextBox ID="personId" runat="server" MaxLength="18" AutoPostBack="True" OnTextChanged="personId_TextChanged"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="personId"
                    Display="Dynamic" ErrorMessage="不能为空"></asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="height: 21px">
                文化程度</td>
            <td style="height: 21px">
                <asp:DropDownList ID="whcd" runat="server" DataSourceID="SqlDataSource2" DataTextField="name"
                    DataValueField="name">
                </asp:DropDownList><asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:insurance_dbConnectionString %>"
                    SelectCommand="SELECT * FROM [文化程度表]"></asp:SqlDataSource>
            </td>
            <td style="height: 21px">
                用工形式</td>
            <td style="height: 21px">
                <asp:DropDownList ID="ygxs" runat="server" DataSourceID="SqlDataSource3" DataTextField="name"
                    DataValueField="name">
                </asp:DropDownList><asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:insurance_dbConnectionString %>"
                    SelectCommand="SELECT * FROM [用工形式表]"></asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td style="height: 21px">
                个人身份</td>
            <td style="height: 21px">
                <asp:DropDownList ID="grsf" runat="server" DataSourceID="SqlDataSource4" DataTextField="name"
                    DataValueField="name">
                </asp:DropDownList><asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:insurance_dbConnectionString %>"
                    SelectCommand="SELECT * FROM [个人身份表]"></asp:SqlDataSource>
            </td>
            <td style="height: 21px">
                户口性质</td>
            <td style="height: 21px">
                <asp:RadioButtonList ID="hkxz" runat="server" DataSourceID="SqlDataSource5" DataTextField="name"
                    DataValueField="name" RepeatDirection="Horizontal" OnDataBound="hkxz_DataBound">
                </asp:RadioButtonList><asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:insurance_dbConnectionString %>"
                    SelectCommand="SELECT * FROM [户口性质表]"></asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td style="height: 21px">
                归属单位</td>
            <td style="height: 21px">
            </td>
            <td style="height: 21px">
                单位编号</td>
            <td style="height: 21px">
            </td>
        </tr>
        <tr>
            <td style="height: 21px">
                单位(账户)编号</td>
            <td style="height: 21px">
                <asp:DropDownList ID="zhbh" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource6"
                    DataTextField="code" DataValueField="code" OnDataBound="zhbh_DataBound" OnSelectedIndexChanged="zhbh_SelectedIndexChanged">
                </asp:DropDownList><asp:SqlDataSource ID="SqlDataSource6" runat="server" ConnectionString="<%$ ConnectionStrings:insurance_dbConnectionString %>"
                    SelectCommand="SELECT [code] FROM [资金账户表]"></asp:SqlDataSource>
            </td>
            <td style="height: 21px">
                单位名称</td>
            <td style="height: 21px">
                <asp:TextBox ID="dwmc" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="height: 21px">
                办理险种</td>
            <td style="height: 21px" colspan="3">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
                    DataKeyNames="id" DataSourceID="SqlDataSource9" ForeColor="#333333" ShowFooter="True">
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <Columns>
                        <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                            SortExpression="id" />
                        <asp:BoundField DataField="code" HeaderText="账户编号" SortExpression="code" />
                        <asp:BoundField DataField="name" HeaderText="险种" SortExpression="name" />
                        <asp:BoundField DataField="type" HeaderText="计算方式" SortExpression="type" />
                        <asp:BoundField DataField="BiLi" HeaderText="计算比例" SortExpression="BiLi" />
                        <asp:TemplateField HeaderText="缴费金额">
                            <ItemTemplate>
                                &nbsp;
                            </ItemTemplate>
                            <FooterTemplate>
                                &nbsp;
                            </FooterTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#999999" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource9" runat="server" ConnectionString="<%$ ConnectionStrings:insurance_dbConnectionString %>"
                    SelectCommand="SELECT * FROM [险种表] WHERE ([code] = @code)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="zhbh" DefaultValue="0" Name="code" PropertyName="SelectedValue"
                            Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
                &nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td style="height: 21px">
                缴费时间</td>
            <td style="height: 21px">
                <asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#3366CC"
                    BorderWidth="1px" CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana"
                    Font-Size="8pt" ForeColor="#003399" Height="200px" OnSelectionChanged="Calendar1_SelectionChanged"
                    Width="220px" Visible="False">
                    <SelectedDayStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                    <SelectorStyle BackColor="#99CCCC" ForeColor="#336666" />
                    <WeekendDayStyle BackColor="#CCCCFF" />
                    <TodayDayStyle BackColor="#99CCCC" ForeColor="White" />
                    <OtherMonthDayStyle ForeColor="#999999" />
                    <NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" />
                    <DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" />
                    <TitleStyle BackColor="#003399" BorderColor="#3366CC" BorderWidth="1px" Font-Bold="True"
                        Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" />
                </asp:Calendar>
                <asp:TextBox ID="jfsj" runat="server" ReadOnly="True"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="jfsj"
                    Display="Dynamic" ErrorMessage="时间不能为空"></asp:RequiredFieldValidator>
                <asp:Button ID="Button3" runat="server" CausesValidation="False" OnClick="Button3_Click"
                    Text="选择时间" /></td>
            <td style="height: 21px">
                缴费月数</td>
            <td style="height: 21px">
                <asp:DropDownList ID="jfys" runat="server">
                    <asp:ListItem>1</asp:ListItem>
                    <asp:ListItem>2</asp:ListItem>
                    <asp:ListItem>3</asp:ListItem>
                    <asp:ListItem>4</asp:ListItem>
                    <asp:ListItem>5</asp:ListItem>
                    <asp:ListItem Selected="True">6</asp:ListItem>
                    <asp:ListItem>7</asp:ListItem>
                    <asp:ListItem>8</asp:ListItem>
                    <asp:ListItem>9</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                    <asp:ListItem>11</asp:ListItem>
                    <asp:ListItem>12</asp:ListItem>
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td style="height: 21px">
                本年度缴费工资</td>
            <td style="height: 21px">
                <asp:DropDownList ID="jfgz" runat="server" DataSourceID="SqlDataSource8" DataTextField="salary"
                    DataValueField="salary">
                </asp:DropDownList><asp:SqlDataSource ID="SqlDataSource8" runat="server" ConnectionString="<%$ ConnectionStrings:insurance_dbConnectionString %>"
                    SelectCommand="SELECT [salary] FROM [平均工资表] WHERE ([flag] = @flag)">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="1" Name="flag" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td style="height: 21px">
                缴费比例</td>
            <td style="height: 21px">
                <asp:DropDownList ID="jfbl" runat="server" DataSourceID="SqlDataSource7" DataTextField="BiLi"
                    DataValueField="BiLi">
                </asp:DropDownList>
                <asp:Button ID="Button2" runat="server" Text="计算缴费金额" OnClick="Button2_Click" />
                <asp:SqlDataSource ID="SqlDataSource7" runat="server" ConnectionString="<%$ ConnectionStrings:insurance_dbConnectionString %>"
                    SelectCommand="SELECT [BiLi] FROM [参保比例表]"></asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td style="height: 21px">
                邮政编码</td>
            <td style="height: 21px">
                <asp:TextBox ID="yzbm" runat="server"></asp:TextBox></td>
            <td style="height: 21px">
                联系电话</td>
            <td style="height: 21px">
                <asp:TextBox ID="lxdh" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="height: 21px">
                户口地址</td>
            <td style="height: 21px" colspan="3">
                <asp:TextBox ID="hkdz" runat="server" MaxLength="255" Width="400px"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="height: 21px">
                通讯地址</td>
            <td style="height: 21px" colspan="3">
                <asp:TextBox ID="txdz" runat="server" MaxLength="255" Width="400px"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="height: 21px">
                参保状态</td>
            <td style="height: 21px">
                <asp:DropDownList ID="cbzt" runat="server">
                    <asp:ListItem>新参保</asp:ListItem>
                </asp:DropDownList></td>
            <td style="height: 21px">
            </td>
            <td style="height: 21px">
            </td>
        </tr>
        <tr>
            <td style="height: 21px">
                办理人</td>
            <td style="height: 21px">
                <asp:TextBox ID="blr" runat="server"></asp:TextBox></td>
            <td style="height: 21px">
                登记时间</td>
            <td style="height: 21px">
                <asp:TextBox ID="djsj" runat="server" ReadOnly="True"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="height: 21px">
                <asp:Button ID="Button1" runat="server" Text="提交" OnClick="Button1_Click" /></td>
            <td style="height: 21px">
            </td>
            <td style="height: 21px">
            </td>
            <td style="height: 21px">
            </td>
        </tr>
    </table>
    </div>
        <br />
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    </form>
</body>
</html>
